package com.lanchetech.dao;

import com.lanchetech.entity.CommentStatistics;
import org.apache.ibatis.annotations.Mapper;import org.apache.ibatis.annotations.Param;import java.util.List;
import java.util.Map;

@Mapper
public interface CommentStatisticsMapper {
    int deleteByPrimaryKey(Long id);

    int insert(CommentStatistics record);

    int insertSelective(CommentStatistics record);

    CommentStatistics selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(CommentStatistics record);

    int updateByPrimaryKey(CommentStatistics record);

    CommentStatistics findOneBySpuId(@Param("spuId") Long spuId);

    List<CommentStatistics> findAllBySpuIds(@Param("spuIds") List<Long> spuIds);

    int updateTotalAndFiveAndDefaultFiveBySpuId(@Param("updatedTotal")Integer updatedTotal,@Param("updatedFive")Integer updatedFive,@Param("updatedDefaultFive")Integer updatedDefaultFive,@Param("spuId")Long spuId);

    int batchUpdateByMap(@Param("map") Map<Long, Long> map);

    int addOneTotalAndFiveAndDefaultFiveBySpuId(@Param("spuId")Long spuId);


}